package com.example.crmdemo.project.controller;

import com.example.crmdemo.project.domain.Customer;
import com.example.crmdemo.project.service.ICustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 客户控制层
 */
@RestController
public class CustomerController {
    @Autowired
    private ICustomerService customerService;

    /**
     * 获取所有客户信息
     * @return
     */
    @GetMapping("/Customer/list")
    public List findAllUser() {
        List<Customer> customerList = customerService.findAllCustomer();
        return customerList;
    }
}

